package com.example.finalwork;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

public class PersonActivity extends AppCompatActivity implements View.OnClickListener{
    private TextView textView4;
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_person);
        textView4 = findViewById(R.id.textView4);
        textView4.setText("学校名称：浙大宁波理工学院\n\n用户名：xxxxxxxx\n\n密码：******");
        findViewById(R.id.button2).setOnClickListener(this);
        setTitle("个人资料");
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.button2:
                startActivity(new Intent(this,MainActivity.class));
                Toast.makeText(this,"返回上一级",Toast.LENGTH_SHORT);
                break;
        }
    }
}
